﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord;

namespace ZDSoft.TES.Entity.SystemEntity
{
    [ActiveRecord("Course")]
    public class Course : EntityBase<Course>
    {
        /// <summary>
        /// 课程名称
        /// </summary>
        [Property]
        public string CourseName { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [Property]
        public bool IsActive { get; set; }

        [HasAndBelongsToMany(typeof(Organization), Table = "CourseOrganization", ColumnKey = "CourseID", ColumnRef = "OrganizationID", Inverse = true, Lazy = true)]
        public IList<Organization> Organizations { get; set; }

        [HasMany(typeof(UserCourse), ColumnKey = "CourseID", Inverse = true, Lazy = true)]
        public IList<UserCourse> UserCourses { get; set; }
    }
}
